package org.truenewx.tnxjeex.unit.model;

import javax.measure.quantity.Volume;

import org.truenewx.tnxjee.core.caption.Caption;
import org.truenewx.tnxjee.core.enums.annotation.EnumConstantScene;
import org.truenewx.tnxjee.core.enums.annotation.EnumSubTypeCaption;
import org.truenewx.tnxjee.core.enums.annotation.SimpleEnumType;
import org.truenewx.tnxjeex.unit.support.MeasureUnits;
import org.truenewx.tnxjeex.unit.util.UnitScenes;
import org.truenewx.tnxjeex.unit.util.UnitTypes;
import tech.units.indriya.unit.Units;

/**
 * 体积单位
 */
@Caption("体积单位")
@SimpleEnumType(name = UnitTypes.VOLUME)
@EnumSubTypeCaption(subname = UnitScenes.VOLUME_STANDARD, caption = "标准体积单位")
@EnumSubTypeCaption(subname = UnitScenes.VOLUME_NORMAL, caption = "常规体积单位")
public interface VolumeUnit extends MeasureUnit<Volume> {

    @Caption("立方米")
    @EnumConstantScene(subType = UnitScenes.VOLUME_STANDARD)
    @EnumConstantScene(subType = UnitScenes.VOLUME_NORMAL)
    VolumeUnit CUBIC_METRE = MeasureUnits.getInstance()
            .add(Units.CUBIC_METRE, VolumeUnit.class, null, "CUBIC_METRE", "CUM");

    @Caption("立方分米")
    @EnumConstantScene(subType = UnitScenes.VOLUME_STANDARD)
    VolumeUnit CUBIC_DECIMETER = MeasureUnits.getInstance().divide(CUBIC_METRE, 1000, "d" + Units.CUBIC_METRE,
            "CUBIC_DECIMETER", "VCUDM");

    @Caption("立方厘米")
    @EnumConstantScene(subType = UnitScenes.VOLUME_STANDARD)
    VolumeUnit CUBIC_CENTIMETER = MeasureUnits.getInstance().divide(CUBIC_DECIMETER, 1000, "c" + Units.CUBIC_METRE,
            "CUBIC_CENTIMETER", "VCUCM");

    @Caption("升")
    @EnumConstantScene(subType = UnitScenes.VOLUME_NORMAL)
    VolumeUnit LITER = MeasureUnits.getInstance().add(Units.LITRE, VolumeUnit.class, "L", "LITER", "VL");

    @Caption("毫升")
    @EnumConstantScene(subType = UnitScenes.VOLUME_NORMAL)
    VolumeUnit MILLILITER = MeasureUnits.getInstance().divide(LITER, 1000, "ml", "MILLILITER", "VML");

}
